package com.myk.game.connect6tool.models;


public class ChessInfo {

    private static volatile int count = 0;
    private int order;
    public boolean isBlack;
    public boolean isMark;
    public int col;
    public int row;
    public float startX;
    public float startY;

    public ChessInfo(boolean isBlack, int col, int row, float startX, float startY) {
        this.order = getAndIncrement();
        this.isBlack = isBlack;
        this.isMark = false;
        this.col = col;
        this.row = row;
        this.startX = startX;
        this.startY = startY;
    }

    public synchronized int getAndIncrement() {
        return ++count;
    }

    public int getOrderNo() {
        return order;
    }

    public void setMark(boolean isMark) {
        this.isMark = isMark;
    }

    @Override
    public String toString() {
        return "order:" + order + ",col:" + col + ",row:" + row;
    }
}
